package com.froggyware.tadpole.headache;

import com.froggyware.tadpole.TadObject;

import java.util.ArrayList;
import java.util.List;

/**
 * The complete headache entity object
 * User: Steven
 * Date: 09/09/11
 * Time: 10:05
 */
public class Headache extends TadObject {

    // time of the headache
    private int year;
    private int month;
    private int day;
    private int hour;
    private int minute;
//    private Date datetime;  // combination of above,

    private String typeOfHeadache;
    private String durationOfHeadache;

    private List painLocations = new ArrayList<PainLocation>();
    private List rootCauses = new ArrayList<RootCause>();
    private List Medications = new ArrayList<Medication>();
    private String medicationEffectiveness;

    private boolean unableToWork=false;

    // This is a CLOB
    private String notes;

    public Headache() {
        super();
    }

    public int getYear() {
        return year;
    }

    public void setYear(int year) {
        this.year = year;
    }

    public int getMonth() {
        return month;
    }

    public void setMonth(int month) {
        this.month = month;
    }

    public int getDay() {
        return day;
    }

    public void setDay(int day) {
        this.day = day;
    }

    public int getHour() {
        return hour;
    }

    public void setHour(int hour) {
        this.hour = hour;
    }

    public int getMinute() {
        return minute;
    }

    public void setMinute(int minute) {
        this.minute = minute;
    }

    public String getTypeOfHeadache() {
        return typeOfHeadache;
    }

    public void setTypeOfHeadache(String typeOfHeadache) {
        this.typeOfHeadache = typeOfHeadache;
    }

    public String getDurationOfHeadache() {
        return durationOfHeadache;
    }

    public void setDurationOfHeadache(String durationOfHeadache) {
        this.durationOfHeadache = durationOfHeadache;
    }

    public List getPainLocations() {
        return painLocations;
    }

    public void setPainLocations(List painLocations) {
        this.painLocations = painLocations;
    }

    public void addPainLocation(PainLocation loc) {
        painLocations.add(loc);
    }

    public List getRootCauses() {
        return rootCauses;
    }

    public void setRootCauses(List rootCauses) {
        this.rootCauses = rootCauses;
    }

    public void addRootCause(RootCause r) {
        rootCauses.add(r);
    }

    public List getMedications() {
        return Medications;
    }

    public void setMedications(List medications) {
        Medications = medications;
    }

    public void addMedication(Medication m) {
        Medications.add(m);
    }

    public String getMedicationEffectiveness() {
        return medicationEffectiveness;
    }

    public void setMedicationEffectiveness(String medicationEffectiveness) {
        this.medicationEffectiveness = medicationEffectiveness;
    }


    public boolean isUnableToWork() {
        return unableToWork;
    }

    public void setUnableToWork(boolean unableToWork) {
        this.unableToWork = unableToWork;
    }

    public String getNotes() {
        return notes;
    }

    public void setNotes(String notes) {
        this.notes = notes;
    }

    @Override
    public String toString() {
        return "Headache{" +
                "year=" + year +
                ", month=" + month +
                ", day=" + day +
                ", hour=" + hour +
                ", minute=" + minute +
                ", typeOfHeadache='" + typeOfHeadache + '\'' +
                ", durationOfHeadache='" + durationOfHeadache + '\'' +
                ", medicationEffectiveness='" + medicationEffectiveness + '\'' +
                ", unableToWork=" + unableToWork +
                ", notes='" + notes + '\'' +
                '}';
    }
}
